export const useMenuStore = defineStore("menu", {
  state: () => {
    const adminSystem = getAdminSystem();
    return {
      adminSystem,
      refresh: false,
    };
  },
  getters: {
    adminMenuListBySystem: (state) => {
      const userStore = useUserStore();
      return getAdminMenuListBySystem(
        state.adminSystem,
        userStore.adminSystemList
      );
    },
  },
  actions: {
    optAdminSystem(systemName: string) {
      this.adminSystem = systemName;
    },
  },
});
